33

Build Your Own Game—Tic Tac Toe

33

Setting up any line to stop just requires double-​clicking. When you do that, it

is technically called “setting a break point”. After setting it, if you change your

mind, just double-​click again and the break point goes away. You can also use the

menu to turn the break point on or off. This is the option in the menu called “Toggle

Breakpoint”. Note that there are a few other features as well in the menu, which we

will not go into in this chapter.

FIGURE 2.31  Toggle Breakpoint.

Once you run the program and it stops at a break point, you can see the value of

any variable in that function by simply hovering over the variable. See this example

in Figure 2.32, where I stopped the code at the highlighted line. By hovering over the

variable “OScore” we can see its value is 0 at this point.

FIGURE 2.32  Stopping Code.